---
title: Save a task collection
summary: Apply pending edits and delegate per-item persistence for a task collection.
status: draft
owner: SAIF Documentation
last_reviewed: 2026-08-21
library: SAIF.Business.Tasks
reference_type: embedded
operation_id: OP-8
trigger: Application calls Save() on a task collection
---

# Save a task collection

This operation commits pending edits on a `clsTaskCollection` and delegates per-item insert/update/delete lifecycles to the framework base class.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-8 |
| **Trigger** | Application calls `Save()` on a collection |
| **Inputs** | `clsTaskCollection` with pending edits |
| **Outputs** | Persisted inserts/updates/deletes |
| **Primary components** | `clsTaskCollection.Save` |
| **Entry point** | `SAIF.Business.Tasks/clsTaskCollection.vb` |

## Steps

1. Call `Me.ApplyEdit()` to commit pending edits on the collection.
2. Call `MyBase.Save()`, which drives per-item insert/update/delete lifecycles through the framework.*
   > **Origin**: Step 2's per-item dispatch logic is implemented in the SAIF BOF Framework's `clsBusinessCollectionBase.Save` and was not traced in this analysis pass. Each dispatched item follows [Create/insert a task](create-insert-task.md), [Update a task](update-task.md), or [Delete (complete) a task](delete-complete-task.md) depending on the item's state.
3. Return the base result.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([Save called on collection]) --> S1["ApplyEdit commits pending<br>edits"]
	S1 --> S2["MyBase.Save dispatches<br>per-item lifecycle"]
	S2 --> EndOk([Base result returned])
```

## Failure and edge-case behavior

- Failure behavior for individual items follows the same rules as the single-item [Create/insert](create-insert-task.md), [Update](update-task.md), and [Delete](delete-complete-task.md) operations.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts. Statements
> marked with ** could not be confirmed; treat as unknown until verified.

## Sources
- SAIF.Business.Tasks/clsTaskCollection.vb
